package com.example.controller;


import com.example.config.R;
import com.example.service.IAddressService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 收货地址Controller
 *
 * @author ruoyi
 * @date 2022-11-22
 */
@RestController
@RequestMapping("/address")
public class AddressController  {

    @Autowired
    private IAddressService iAddressService;

    /**
     * 根据会员id获取他的地址
     * @param memberId
     * @return
     */
    @GetMapping("getAddress")
    public R getAddress(Long dealerId)
    {
        if(dealerId==null)
        {
            return R.fail("参数错误");
        }
        return iAddressService.getAddress(dealerId);
    }


}
